#ifndef UI_SCREEN_H_
#define UI_SCREEN_H_

#include "ui.h"

///////////////////////////////////////////////////////
// UI screen for Main Menu

// bg video
const struct s_ui_video menu_bg[] = { { .fname="data/video/menusky.smk", .x = 0, .y = 0 } };

// textures
const char *menu_tex[] = { "main1", "main2", "main3", "main4", "main5" };
const struct s_ui_static menu_obj[] = { { .tex = 0, .x = 2, .y = 29, .w = 425, .h = 414, .t_x = 0, .t_y = 0, .t_w = 425, .t_h = 414},
                                    { .tex = 1, .x = 289, .y = 0, .w = 81, .h = 29, .t_x = 0, .t_y = 0, .t_w = 81, .t_h = 29},
                                    { .tex = 2, .x = 427, .y = 315, .w = 213, .h = 165, .t_x = 0, .t_y = 0, .t_w = 213, .t_h = 165},
                                    { .tex = 4, .x = 35, .y = 63, .w = 41, .h = 64, .t_x = 0, .t_y = 0, .t_w = 39, .t_h = 64,
                                            .reg_x = 35, .reg_y = 59, .reg_w = 360, .reg_h = 64,
                                            .hi_x = 39, .hi_y = 0, .hi_w = 39, .hi_h = 64, .gamestate_click = GAMESTATE_CAREER},
                                    { .tex = 4, .x = 35, .y = 127, .w = 41, .h = 64, .t_x = 0, .t_y = 64, .t_w = 39, .t_h = 64,
                                            .reg_x = 35, .reg_y = 123, .reg_w = 360, .reg_h = 64,
                                            .hi_x = 39, .hi_y = 64, .hi_w = 39, .hi_h = 64, .gamestate_click = GAMESTATE_USER},
                                    { .tex = 4, .x = 35, .y = 191, .w = 41, .h = 64, .t_x = 0, .t_y = 128, .t_w = 39, .t_h = 64,
                                            .reg_x = 35, .reg_y = 187, .reg_w = 360, .reg_h = 64,
                                            .hi_x = 39, .hi_y = 128, .hi_w = 39, .hi_h = 64, .gamestate_click = GAMESTATE_LOAD},
                                    { .tex = 4, .x = 35, .y = 255, .w = 41, .h = 64, .t_x = 0, .t_y = 192, .t_w = 39, .t_h = 64,
                                            .reg_x = 35, .reg_y = 251, .reg_w = 360, .reg_h = 64,
                                            .hi_x = 39, .hi_y = 192, .hi_w = 39, .hi_h = 64, .gamestate_click = GAMESTATE_MULTI},
                                    { .tex = 4, .x = 35, .y = 319, .w = 41, .h = 41, .t_x = 0, .t_y = 256, .t_w = 39, .t_h = 41,
                                            .reg_x = 35, .reg_y = 315, .reg_w = 360, .reg_h = 64,
                                            .hi_x = 39, .hi_y = 256, .hi_w = 39, .hi_h = 41, .gamestate_click = GAMESTATE_EXIT},

									{ .tex = 3, .x = 336, .y = 60, .w = 60, .h = 52, .t_x = 0, .t_y = 0, .t_w = 60, .t_h = 52,
											.reg_x = 35, .reg_y = 59, .reg_w = 360, .reg_h = 64,
											.hi_x = 60, .hi_y = 0, .hi_w = 60, .hi_h = 52, .gamestate_click = GAMESTATE_CAREER},
									{ .tex = 3, .x = 336, .y = 112, .w = 60, .h = 65, .t_x = 0, .t_y = 52, .t_w = 60, .t_h = 65,
											.reg_x = 35, .reg_y = 123, .reg_w = 360, .reg_h = 64,
											.hi_x = 60, .hi_y = 52, .hi_w = 60, .hi_h = 65, .gamestate_click = GAMESTATE_USER},
									{ .tex = 3, .x = 336, .y = 177, .w = 60, .h = 65, .t_x = 0, .t_y = 117, .t_w = 60, .t_h = 65,
											.reg_x = 35, .reg_y = 187, .reg_w = 360, .reg_h = 64,
											.hi_x = 60, .hi_y = 117, .hi_w = 60, .hi_h = 65, .gamestate_click = GAMESTATE_LOAD},
									{ .tex = 3, .x = 336, .y = 242, .w = 60, .h = 65, .t_x = 0, .t_y = 182, .t_w = 60, .t_h = 65,
											.reg_x = 35, .reg_y = 251, .reg_w = 360, .reg_h = 64,
											.hi_x = 60, .hi_y = 182, .hi_w = 60, .hi_h = 65, .gamestate_click = GAMESTATE_MULTI},
									{ .tex = 3, .x = 336, .y = 307, .w = 60, .h = 65, .t_x = 0, .t_y = 247, .t_w = 60, .t_h = 65,
											.reg_x = 35, .reg_y = 315, .reg_w = 360, .reg_h = 64,
											.hi_x = 60, .hi_y = 247, .hi_w = 60, .hi_h = 65, .gamestate_click = GAMESTATE_EXIT}
};

// Text
const struct s_ui_text menu_text[] = { { .x = 100, .y = 50, .text = "New Career Game" },
										{ .x = 100, .y = 50, .text = "New User Game" },
										{ .x = 100, .y = 50, .text = "Load Saved Game" },
										{ .x = 100, .y = 50, .text = "Multiplayer" },
										{ .x = 100, .y = 50, .text = "Quit" } };


// Screen definition: Pulls it all together
const struct s_ui_screen menu_screen = { .w = 640,
										.h = 480,
										.gamestate_escape = GAMESTATE_EXIT,
										.vid_priority = 0,
										.name_bgm = "menuback",
										.tex_fname = menu_tex,
										.vid = menu_bg,
										.obj = menu_obj,
										.txt = menu_text,
										.num_tex = SIZEOF_ARRAY(menu_tex), .num_vid = SIZEOF_ARRAY(menu_bg), .num_obj = SIZEOF_ARRAY(menu_obj), .num_txt = SIZEOF_ARRAY(menu_text)
};


////////////////////////////////////////
// CAREER
// bg video	
const struct s_ui_video career_vid_0[] = { { .fname="data/video/city0_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city1_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city2_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_1[] = { { .fname="data/video/city3_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city4_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city5_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_2[] = { { .fname="data/video/city6_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city7_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city8_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_3[] = { { .fname="data/video/city9_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city10_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city11_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_4[] = { { .fname="data/video/city12_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city13_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city14_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_5[] = { { .fname="data/video/city15_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city16_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city17_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_6[] = { { .fname="data/video/city18_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city19_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city20_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_7[] = { { .fname="data/video/city21_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city22_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city23_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_8[] = { { .fname="data/video/city24_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city25_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city26_s.smk", .x = 78, .y = 248 } };
const struct s_ui_video career_vid_9[] = { { .fname="data/video/city27_s.smk", .x = 78, .y = 71 },
											{ .fname="data/video/city28_s.smk", .x = 338, .y = 71 },
											{ .fname="data/video/city29_s.smk", .x = 78	, .y = 248 } };

// textures
const char *career_tex[] = { "career", "carsel" };
const struct s_ui_static career_obj[] = { { .tex = 0, .x = 0, .y = 0, .w = 614, .h =  435, .t_x = 0, .t_y = 0, .t_w = 614, .t_h = 435},
										{ .tex = 1, .x = 0, .y = 44, .w = 307, .h = 172, .t_x = 0, .t_y = 404, .t_w = 307, .t_h = 172,
											.reg_x = 61, .reg_y = 51, .reg_w = 235, .reg_h = 143,
											.hi_x = 0, .hi_y = 44,
											.gamestate_click = GAMESTATE_INIT_GAME, .mouseover_sound=1, .mouseup_sound=1},
										{ .tex = 1, .x = 307, .y = 44, .w = 249, .h = 172, .t_x = 307, .t_y = 404, .t_w = 249, .t_h = 172,
											.reg_x = 317, .reg_y = 51, .reg_w = 235, .reg_h = 143,
											.hi_x = 307, .hi_y = 44,
											.gamestate_click = GAMESTATE_INIT_GAME, .mouseover_sound=1, .mouseup_sound=1},
										{ .tex = 1, .x = 0, .y = 216, .w = 307, .h = 167, .t_x = 0, .t_y = 576, .t_w = 307, .t_h = 167,
											.reg_x = 61, .reg_y = 226, .reg_w = 235, .reg_h = 143,
											.hi_x = 0, .hi_y = 216,
											.gamestate_click = GAMESTATE_INIT_GAME, .mouseover_sound=1, .mouseup_sound=1}
};


const struct s_ui_screen career_screen[10] = {
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_0, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_1, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_2, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_3, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_4, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_5, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_6, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_7, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_8, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 },
									{ .w = 614, .h = 435, .gamestate_escape = GAMESTATE_MENU, .name_bgm = "career", .tex_fname = career_tex,
										.vid = career_vid_9, .vid_priority = 1,
										.obj = career_obj, .txt = NULL, .num_tex = 2, .num_vid = 3, .num_obj = 4, .num_txt = 0 }
};

// credits screen
const struct s_ui_screen credits_screen = { .w = 640, .h = 480, .name_bgm = "radio/stations/classic/music/valk", .vid_priority = 0, .tex_fname = NULL, .vid = NULL, .obj = NULL, .txt = NULL};

#endif
